/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.uniandes.patrones.beans;

import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

/**
 *
 * @author alvar-go@uniandes.edu.co
 */
public class TemplateBean {
    
    public final static String INICIO= "ingreso";
    
    public String terminarSesion(){
        FacesContext context = FacesContext.getCurrentInstance();
        HttpSession sesion = (HttpSession) context.getExternalContext().getSession(false);
        if(sesion != null){
            sesion.invalidate();
            return  INICIO;
        }
        return null;
    }
}
